package com.cencat.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.util.List;

/**
 * 用户角色关联DTO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "用户角色关联DTO")
public class UserRoleDTO {

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID", required = true, example = "1")
    private Long userId;

    /**
     * 角色ID列表
     */
    @NotEmpty(message = "角色ID列表不能为空")
    @Schema(description = "角色ID列表", required = true, example = "[1, 2, 3]")
    private List<Long> roleIds;

    /**
     * 租户ID
     */
    @NotNull(message = "租户ID不能为空")
    @Schema(description = "租户ID", required = true, example = "1")
    private Long tenantId;

    /**
     * 操作类型（1-分配角色，2-移除角色）
     */
    @Schema(description = "操作类型（1-分配角色，2-移除角色）", example = "1")
    private Integer operationType;

    /**
     * 备注
     */
    @Schema(description = "备注", example = "批量分配角色")
    private String remark;
}